import service from '@/utils/request'
// @Summary 用户登录 获取动态路由
// @Produce  application/json
// @Param 可以什么都不填 调一下即可
// @Router /menu/getMenu [get]
export const getMyMenuList = () => {
  return service({
    url: '/menu/getMyMenuList',
    method: 'get'
  })
}

// @Summary 获取menu列表
// @Produce  application/json
// @Param {
//  page     int
//	pageSize int
// }
// @Router /menu/getMenuList [post]
export const getMenuList = (data) => {
  return service({
    url: '/menu/getMenuList',
    method: 'post',
    data
  })
}

// @Summary 新增基础menu
// @Produce  application/json
// @Param menu Object
// @Router /menu/saveMenu [post]
export const saveMenu = (data) => {
  return service({
    url: '/menu/saveMenu',
    method: 'post',
    data
  })
}

// @Summary 获取用户menu关联关系
// @Produce  application/json
// @Param ID float64
// @Router /menu/deleteMenu [post]
export const deleteMenu = (data) => {
  return service({
    url: '/menu/deleteMenu',
    method: 'post',
    data
  })
}

// @Summary 获取用户menu关联关系
// @Produce  application/json
// @Param authorityId string
// @Router /menu/getMenuResourceList [get]
export const getMenuResourceList = (params) => {
  return service({
    url: '/menu/getMenuResourceList',
    method: 'get',
    params
  })
}

// @Summary 修改menu列表
// @Produce  application/json
// @Param menu Object
// @Router /menu/saveMenuResourceList [post]
export const saveMenuResourceList = (data) => {
  return service({
    url: '/menu/saveMenuResourceList',
    method: 'post',
    data
  })
}
